home *** CD-ROM | disk | FTP | other *** search
-
- > Priority decay is briliant, cant believe I missed that :-)
-
- :)
-
- > Lets say you give a word of priority that decays and reaches zero at the
- > same time as the sample is finished!?!
-
- If you want to try this, then that would be even better. :)
-
- You could be _really_ insane and use an envelope as the priority! :)))
-
- >As for the input, lets have:
- * Sample Nr (Word)
-
- <cut>
-
- This all looks good...
-
- > Then you get back a long that is the ID of the sound that later on is used
- > if you want to move the X and Y, or stop the sample.
-
- Yes - back-links are going to be useful for modifying any sounds still playing,
- but terminating the back-links when a sample stops can be a problem without
- having a second back-link in the other direction to null the first link (phew!).
-
- But it sounds good!
-
- > Currently I have four diferent pitches:
- > 12.55KHz, 10.98KHz, 9.41KHz and 7.84KHz
-
- So these pitches are hard-wired, rather than dynamic?
-
- I take it this is faster (CPU wise) than a variable pitch player..
-
- > I did not get the "(around) 9khz" thing, but after trying around in some
-
- Doom plays it's samples at about 9khz, with a random pitch offset of up to
- about 3khz - the numbers themselves are just guesses though..
-
- > trackers I thinks this will not sound to bad. And dont worry about the
- > speed, At first I thougth pitch would slow down. But with theese numbers
- > it turned out that it takes less time the more I pitch down from 12.5KHz.
-
- Ok..
-
- > Nope not such as much code. The size of the actual code loops depends on
- > how to pitch the sample and 16Bits or 8Bits replay and if it is ambient
-
-
-
- Right. I understand. You have a different loop for each pitch, instead of
- one loop with a fractional address generator. Does this save much CPU time?
-
- I have never tried fixed loops for this before you see...
-
- > sounds. The worst case loop end up at 262Bytes. That is No pitch 16Bit
- > 6.25KHz sample, interleaved and spot sound only. Only changing to Non Inter
- > leaved will reduse this to 246. Pitches sound decrease even more, not to
- > mention silence!! :-)
-
- Right - anything under 256 bytes is ideal.
-
- > But the tables will be quite huge!
-
- I think we can probably afford this....
-
- > 16Bit, DDAdio (3D sound), will take up more then 250K!!!
-
- Fair enough...
-
- > Now I calculate the 3D sound in 256 degrees around the player, halving
- > theese steps will halve the size of the table. SubStation uses 16 or 32
- > degrees. So 256 seems to be pointless. But I think I will make it as an
- > aption of: 32, 64, 128 or 256 degrees. Having 8Bit replay will also halve
-
- Sounds good!
-
- > the size. And Only calculating Mono (Distance only) will take the tables
- > away nearly completely!
-
- > Therefor I ask if it is possible to allocate memory for theese buffers while
- > playing, or will this make troubles with the cashe routines for the
-
- Allocate while playing? Well - it is possible, but I would need to add semaphores
- to prevent clashing between interrupt-based allocations and allocations performed
- in the main thread. But it can be done if needed.
-
- Do you really need to allocate on-the-fly on an interrupt?
-
- > textures??? I would want to be able to not only alloctae memmory whenever
- > I want to. I do also want to change the size of my allocated memory whenever
- > I want to.! Is this possible???
-
- Well, you can allocate when you want, and I can add code to shrink blocks, but
- growing blocks will always be a problem. We could have a block lock/unlock option
- where blocks can be 'moved' by the manager if unlocked, but if you try this on
- and interrupt you will get real problems.
-
- So, either drop the allocation on an interrupt, or loose the ability to grow
- blocks. Apart from this, everything is ok.
-
- > Douglas do also says that some kind of envelope of the sound is wanted.
- > Personaly I cant se why. Dont you fixx those things when you sample the
- > sounds in the first place? I might be wrong but is this realy needed??? It
- > wont take any extra processor power, just need some few more tables. But
- > still are they needed? Do PC doom use envelopes for the sound fx?
-
- The envelope is not all that important, but it does let you make more sounds
- with the same number of samples. Adds variation (like pitch turbulence).
-
- You can leave it out if you want to. It's up to you...
-
- > Further more the sound need to be cashed just as the textures. To bad but
- > all sounds dont fit in normal memory. So I would want to reuse the cashe
- > routines for the textures. Or maybe the same routines could be used? This is
- > not urgent right now, but it would be best if I could get look and
- > description of that piece of code in time :-) (Dont have a clue about how a
- > cashe could be coded in a easy way)
-
- Well, the samples should be accessed via the cache, but not on an interrupt.
- Otherwise the disk routines will kick in and screw the machine up big time.
-
- Cache thrashing must always be via the main thread, and we will need a block
- 'locking' flag to ensure the sample remains in memory until it has finished
- playing - or a texture might load over it mid-playback. :)
-
- > And last but not least: clock cykles! I have a clock cykle table for 030
- > in a file called 68030.TXT, this does not make much sence, and dont seem to
- > be very correct as I could see... So there for I ask for a new timing
- > table. Or someone just could tell me how many cykles the following commands
- > take:
-
- Forget about clock cycles - worry instead about bus latency & delayed reads/
- writes. A MUCH bigger problem on the Falcon. If you want details, send me a mail.
-
- > Hmm, seems like a lot of commands, but some of them are repeated I think.
- > Could someone please just check out the timing for cash hits and non-hits
- > for al of theese and I will be very happy! And then I would like to know
- > how many clock cykles you aproximatly have each VBL. If I am to believe
-
- Don't think like that on the Falcon - it's variable by several thousand percent!
-
- You have to think almost entirely in terms of bus references, and how well they
- overlap with other CPU operations. This is where most of the efficiency is gained.
-
- This of course always involves the cache...
-
- > Oh, one last thing! May I use FPU commands???
-
- I'd like to avoid FPU, as not everyone has one. We can supply maths
- routines if you need them. I think there is a basic SQRT call already
- in BM, but a better one can be produced for intensive use.
-
- If the DSP is free at the time, we can supply a hardware implementation for you.
-
- > I need Square root and arc-sine for the DD Audio calculation...
-
- SQRT is no problem. ASin will probably need some tables.
-
- Keep up the good work! :)
-
- Doug.
-
-